package com.luck.emp.entity;

import java.util.Date;

import com.luck.org.entity.VDepartment;
import com.luck.org.entity.VUser;
import com.luck.pf.util.DateUtil;
import com.luck.pf.util.FormateUtil;

/**
 * 说明:ENEITY类 Copyright: Copyright (c) 2011 深圳**科技
 * 
 * @author
 * 
 */
public class EmpTSlOrderM implements java.io.Serializable {
	/**
	 * pk 销售单号码
	 **/
	String slCode;
	/**
	 * 单据类型:销售单，销售退货单
	 **/
	String billType;
	/**
	 * 部门ID
	 **/
	Long deptId;
	VDepartment dept;
	/**
	 * 客户ID
	 **/
	Long custId;
	EmpTCustInfo cust;
	/**
	 * 业务员ID
	 **/
	Long salemanId;
	EmpTSalesman saleman;
	/**
	 * 支付方式,1现金,2记账
	 **/
	String payType;
	/**
	 * 单据状态
	 **/
	String status;
	/**
	 * 原始销售订单ID：订单退货时，存入原销售订单的ID。
	 **/
	String oldSlCode;
	/**
	 * 创建人
	 **/
	private VUser createUser;
	/**
	 * 创建时间
	 **/
	Date createDate;
	/**
	 * 修改人
	 **/
	private VUser modiUser;
	/**
	 * 修改时间
	 **/
	Date modiDate;
	/**
	 * 折扣率
	 **/
	Double discRatio;
	String tel;//电话
	String addr;//地址
	String custName;//客户名称
	
	/**
	 * 详情单ID
	 **/
	Long expressNo;
	/**
	 * 备注
	 **/
	String note;
	/**
	 * 出货仓库
	 **/
	String whCode;
	EmpTWarehouse wh;

	public EmpTSlOrderM() {
	}

	public String getSlCode() {
		return this.slCode;
	}

	public void setSlCode(String slCode) {
		this.slCode = slCode;
	}

	public String getBillType() {
		return this.billType;
	}

	public void setBillType(String billType) {
		this.billType = billType;
	}

	public Long getDeptId() {
		return this.deptId;
	}

	public void setDeptId(Long deptId) {
		this.deptId = deptId;
	}

	public Long getCustId() {
		return this.custId;
	}

	public void setCustId(Long custId) {
		this.custId = custId;
	}

	public Long getSalemanId() {
		return this.salemanId;
	}

	public void setSalemanId(Long salemanId) {
		this.salemanId = salemanId;
	}

	public String getPayType() {
		return this.payType;
	}

	public void setPayType(String payType) {
		this.payType = payType;
	}

	public String getStatus() {
		return status;
	}

	public void setStatus(String status) {
		this.status = status;
	}

	public String getOldSlCode() {
		return this.oldSlCode;
	}

	public void setOldSlCode(String oldSlCode) {
		this.oldSlCode = oldSlCode;
	}


	public Date getCreateDate() {
		return this.createDate;
	}

	public void setCreateDate(Date createDate) {
		this.createDate = createDate;
	}


	public Date getModiDate() {
		return this.modiDate;
	}

	public void setModiDate(Date modiDate) {
		this.modiDate = modiDate;
	}

	public Double getDiscRatio() {
		return this.discRatio;
	}

	public void setDiscRatio(Double discRatio) {
		this.discRatio = discRatio;
	}

	public Long getExpressNo() {
		return this.expressNo;
	}

	public void setExpressNo(Long expressNo) {
		this.expressNo = expressNo;
	}

	public String getNote() {
		return this.note;
	}

	public void setNote(String note) {
		this.note = note;
	}

	public String getWhCode() {
		return this.whCode;
	}

	public void setWhCode(String whCode) {
		this.whCode = whCode;
	}

	public VDepartment getDept() {
		return dept;
	}

	public void setDept(VDepartment dept) {
		this.dept = dept;
	}

	public VUser getCreateUser() {
		return createUser;
	}

	public void setCreateUser(VUser createUser) {
		this.createUser = createUser;
	}

	public VUser getModiUser() {
		return modiUser;
	}

	public void setModiUser(VUser modiUser) {
		this.modiUser = modiUser;
	}

	public EmpTWarehouse getWh() {
		return wh;
	}

	public void setWh(EmpTWarehouse wh) {
		this.wh = wh;
	}

	public String getTel() {
		return tel;
	}

	public void setTel(String tel) {
		this.tel = tel;
	}

	public String getAddr() {
		return addr;
	}

	public void setAddr(String addr) {
		this.addr = addr;
	}

	public String getCustName() {
		return custName;
	}

	public void setCustName(String custName) {
		this.custName = custName;
	}
	public EmpTSalesman getSaleman() {
		return saleman;
	}

	public void setSaleman(EmpTSalesman saleman) {
		this.saleman = saleman;
	}


	public EmpTCustInfo getCust() {
		return cust;
	}

	public void setCust(EmpTCustInfo cust) {
		this.cust = cust;
	}

	public String getCreateDateStr() {
		return DateUtil.dateToString(this.createDate, DateUtil.patternE);
	}

	public String getModiDateStr() {
		return DateUtil.dateToString(this.modiDate, DateUtil.patternE);
	}

	public String getDiscRatioStr() {
		return FormateUtil.getInstance().formateDouble(this.discRatio);
	}

	public String getStatusStr(){
		return FormateUtil.getInstance().getNameByCode("p_sale_status", this.status);
	}	
	public String getBillTypeStr(){
		return FormateUtil.getInstance().getNameByCode("p_bill_type", this.billType);
	}	
	public String getPayTypeStr(){
		return FormateUtil.getInstance().getNameByCode("p_pay_type", this.payType);
	}	
}